package org.jeecg.modules.tls.blog.common;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"SUCCESS"),
    //参数校验异常
    PARAM_VALID_ERROR(400,"参数校验异常"),

    //参数校验异常
    TOKEN_EXPIRED(401,"Token已过期"),
    //未授权，无法访问
    AUTH_INVALID(403,"为授权，不能访问"),


    SYSTEM_BUSY(500,"服务器繁忙"),

    SYSTEM_ERROR(500,"未知错误"),

    BLOG_TITLE_ERROR(506,"标题已存在"),

    ADD_BLOG_ERROR(507,"博客添加失败"),

    ADD_TITLE_ERROR(507,"请填写文章标题"),

    ADD_BLOG_ID_ERROR(507,"请选择博客"),

    ADD_BLOG_CATEGORY_ID_ERROR(507,"请选择博客分类"),

    ADD_BLOG_TAG_IDS_ERROR(507,"请选择标签"),



    QUERY_BLOG_LIST_ERROR(508,"博客列表查询失败"),

    QUERY_TRAINING_LIST_ERROR(508,"培训活动查询失败"),

    QUERY_BLOG_ERROR(509,"未查找到此博客"),

    CONTENT_NOT_NULL(511,"博客内容不为空"),

    NoHandlerFoundException(404,"资源找不到"),

    HttpRequestMethodNotSupportedException(405,"HTTP请求参数不一致"),

    HttpMediaTypeNotSupportedException(415,"HTTP请求头的Content-Type 不受支持"),

    USERNAME_EXIST(501,"用户名已存在"),
    PHONENUMBER_EXIST(502,"手机号已存在"), EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    LOGIN_ERROR(505,"用户名或密码错误");
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
